package com.itheima.chapter07.time;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;

public class JDKdemo2 {
    public static void main(String[] args) {
        //转换方法
        LocalDateTime localDateTime = LocalDateTime.of(2022, 12, 13, 14, 15, 16);
        LocalDate localDate =localDateTime.toLocalDate();
        System.out.println(localDate);//2022-12-13
        LocalTime localTime=localDateTime.toLocalTime();
        System.out.println(localTime);//14:15:16
    }
}
